package timing.ukulele.project.client.callback;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import timing.ukulele.common.ResponseResult;
import timing.ukulele.common.flow.FlowData;
import timing.ukulele.common.vo.ExecuteVO;
import timing.ukulele.common.vo.TaskVO;
import timing.ukulele.project.client.FlowClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class FlowClientCallback implements FlowClient {
    private final String tips = "流程服务调用失败";

    @Override
    public ResponseResult<String> publicCompleteTask(ExecuteVO executeVO) {
        log.error(tips);
        return ResponseResult.rpcError(tips);
    }

    @Override
    public ResponseResult<String> startFirstComplete(ExecuteVO executeVO) {
        log.error(tips);
        return ResponseResult.rpcError(tips);
    }

    @Override
    public ResponseResult<FlowData> getById(Long id) {
        log.error(tips);
        return ResponseResult.rpcError(tips);
    }

    @Override
    public ResponseResult<TaskVO> getInstanceTask(String id) {
        log.error(tips);
        return ResponseResult.rpcError(tips);
    }

    @Override
    public ResponseResult<List<TaskVO>> getHistoryTasksByInstanceId(String id) {
        log.error(tips);
        return ResponseResult.rpcError(tips);
    }

    @Override
    public ResponseResult<Page<TaskVO>> findUnDoTaskByAssignee(String assignee, String tenantId, String
            variableName,
                                                               String variableValue, String processInstanceId, Integer sort, Integer current, Integer pageSize) {
        return ResponseResult.rpcError("服务调用失败");
    }
}
